<?php  
namespace app\wechat\validate;
use think\Validate;

/**
 * 用户验证器
 * @package app\admin\validate
 */
class Seat extends Validate{
    //定义验证规则
    protected $rule = [
        'stime'        => 'require|dateFormat:Y-m-d H:i',
        'etime'        => 'require|dateFormat:Y-m-d H:i|gt:stime',
        'areaid' 	   => 'number',
        'seatid'       => 'require',
        'userid'       => 'require|number',
        'formid'       => 'require',
    ];

    //定义验证提示
    protected $message = [
        'stime.require'         => '查询开始时间不能为空',
        'etime.require'         => '查询结束时间不能为空',
        'areaid.number'         => '区域id必须为数字',
    ];

    //定义验证场景
    protected $scene = [
        'areaSearch'   => ['stime','etime'],
        'seatLayout'   => ['stime','etime','areaid'],
    ];
}
?>